package com.acme.service.bank.impl;

import java.util.Set;

import com.acme.domain.account.Account;
import com.acme.domain.client.Bank;
import com.acme.service.bank.BankReportPresentationService;
import com.acme.service.bank.BankReportService;

public class ConsoleBankReportPresentationService implements
		BankReportPresentationService {
	private BankReportService bankReportService;

	@Override
	public void printNumberOfClients(Bank bank) {
		int NumberOfCustomers = bankReportService.getNumberOfCustomers(bank);
		System.out.println("Number of bank customers: " + NumberOfCustomers);
	}

	@Override
	public void printNumberOfOpenedAccounts(Bank bank) {
		int NumberOfOpenedAccounts = bankReportService
				.getNumberOfAccounts(bank);
		System.out.println("Number of opened accounts: "
				+ NumberOfOpenedAccounts);
	}

	@Override
	public void printAccountsSortedBySum(Bank bank) {
		Set<Account> A = bankReportService.getAccountsSortedBySum(bank);
		System.out.println("Accounts sorted by balance value: " + A);
	}

	@Override
	public void printBankCredit(Bank bank) {
		double bankCredit = bankReportService.getBankCredit(bank);
		System.out.println("Total bank credit: " + bankCredit);
	}

	@Override
	public void setBankReportService(BankReportService bankReportService) {
		this.bankReportService = bankReportService;
	}

	@Override
	public void printCustomerAccount(Bank bank) {
		System.out.println("Map of clients:"
				+ bankReportService.getCustomerAccounts(bank));

	}

}
